package com.hunliji.monitor.web.strategy.alert.handlers;

import com.hunliji.monitor.share.enums.AlertActionTypeEnum;
import com.hunliji.monitor.web.strategy.alert.AbstractAlertAction;
import com.hunliji.monitor.web.strategy.alert.model.AlertActionResultBO;
import com.hunliji.monitor.web.strategy.alert.model.AlertContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * File：SmsAlertActionHandler.java<br> Title: <br> Description: <br>
 *
 * @author lejin Date: 2022/10/11
 */
@Slf4j
@Component
public class SmsAlertActionHandler extends AbstractAlertAction {

    @Override
    protected AlertActionTypeEnum getAlertActionType() {
        return AlertActionTypeEnum.SMS;
    }

    @Override
    protected Boolean validate(AlertContext context) {
        return Boolean.TRUE;
    }

    @Override
    protected void doProcess(AlertContext context, AlertActionResultBO result) throws Exception {
        result.setSuccess(Boolean.FALSE);
        result.setErrorMsg("短信发送方式暂未开发");
    }
}
